﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="模糊查询房型和删除房间.aspx.cs" Inherits="linkDATABASE.扩展.模糊查询房型" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>模糊查询房型</title>
    <style>
        table {
            border-collapse: collapse;
            box-shadow: 7px 9px 5px 0px #00000052;
        }

        td {
            border: 1px solid black;
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="房号" DataSourceID="SqlDataSource1">
                <Columns>
                    <asp:BoundField DataField="房号" HeaderText="房号" ReadOnly="True" SortExpression="房号" />
                    <asp:BoundField DataField="预订状态" HeaderText="预订状态" SortExpression="预订状态" />
                    <asp:BoundField DataField="房型" HeaderText="房型" SortExpression="房型" />
                    <asp:BoundField DataField="房态" HeaderText="房态" SortExpression="房态" />
                    <asp:BoundField DataField="床位数" HeaderText="床位数" SortExpression="床位数" />
                    <asp:BoundField DataField="所处位置" HeaderText="所处位置" SortExpression="所处位置" />
                </Columns>
            </asp:GridView>

            <br />
            <br />
            <h3>模糊查询房型</h3>
            输入房型:
            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
            &nbsp;<asp:Button ID="Button1" runat="server" Text="查询" OnClick="Button1_Click" />
            <br />
            <h3>删除房间</h3>
            输入房号:
            <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
            &nbsp;<asp:Button ID="Button2" runat="server" Text="删除" OnClick="Button2_Click" />
            <asp:Label ID="Label1" runat="server" ForeColor="#9933FF"></asp:Label>
            <br />
            <br />
            <br />
            <a href="添加房间.aspx">添加房间</a>

            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:HotelConnectionString %>" SelectCommand="SELECT [房号], [预订状态], [房形] as 房型, [房态], [床位数], [所处位置] FROM [Roominfo]"></asp:SqlDataSource>
            <br />
        </div>
    </form>
</body>
</html>
